<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    
        .con{
            width: 300px;
            height: 300px;
            border: 1px solid #000;
            font-size: 0;
        }

        .con a,.con span{
            width: 50px;
            height: 35px;
          
            background-color: gold;

            /*转换为内联块*/
            display: inline-block;
            font-size: 16px;
        }

        .con p,.con div{
            font-size: 16px;
            background-color: gold;
            display: inline-block;
        }
    
    
    </style>
</head>
<body>
    

    <div class="con">
        <a href="">a1a1</a>
        <a href="">a2a2</a>
        <span>span1</span>
        <span>span2</span>
        <span>span3</span>

        <p>p1</p>
        <div>div1</div>

    </div>


</body>
</html>